/*********************************************************************
*
* Simple Delay Routines
*
*********************************************************************
* FileName: delay.c
* Dependencies: delay.h
* Author Date Comment
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
********************************************************************/
 #if defined(__18CXX)
 #include <delays.h>
 #elif defined(__C30__)
 #include "delay.h"
#endif

void delay_us(unsigned int c){
 /****************************************/
 #if defined(__18CXX)
 /*for 40 mhz */
 	Delay10TCYx(c-3);
 #elif defined(__C30__)
__delay32(c*15);

#endif
} 

void delay_ms(unsigned int c){
 /****************************************/
#if defined(__18CXX)
 /*for 40 mhz */
 	Delay10KTCYx(c-3);
#elif defined(__C30__)
__delay32(c*15900);
#endif
} 



